<template>
  <div class="app-container">
    <el-row>
      <!-- 树结构 -->
      <el-col :span="6" :xs="24">
        <div class="mainbox-left">
          <!-- <div class="box-card"> -->
          <groTreeGroup :handle="true" @treeClick="treeClick" />
          <!-- </div> -->
        </div>
      </el-col>
      <el-col :span="18" :xs="24" style="padding-left: 0px">
        <div class="none2-border3 userlist mainbox">
          <div class="table-container">
            <span class="nameSpan">{{ orgInfo.name }}</span>
            <span v-if="!!orgInfo.describe" class="describeSpan"> {{ orgInfo.describe }}</span>
            <el-tabs v-model="activeName">
              <el-tab-pane label="业务用户" name="first">
                <group-members ref="memberRef" :org-id="orgId" />
              </el-tab-pane>
            </el-tabs>
          </div>
        </div>
      </el-col>
    </el-row>
  </div>
</template>

<script>
import groTreeGroup from './components/groTreeGroup.vue'
import groupMembers from './components/groupMembers.vue'

export default {
  name: 'BusinessUserAuthorization',
  components: { groTreeGroup, groupMembers },
  data() {
    return {
      activeName: 'first',
      orgId: '',
      orgInfo: {}
    }
  },
  methods: {
    treeClick(data) {
      this.orgInfo = data
      this.orgId = data.id
      // this.activeName = 'first'
      // this.$refs.memberRef.getList()
    }
  }
}
</script>
<style scoped lang="scss">
::v-deep .el-tabs__item {
  padding: 0 10px;
}

::v-deep .el-tabs__header {
  margin: 0;
}

.nameSpan {
  font-size: 20px;
  font-weight: 500;
  color: #131414;
  line-height: 28px;
  margin-bottom: 16px;
}

.describeSpan {
  margin-top: 2px;
  font-size: 14px;
  font-weight: 400;
  color: #131414;
  line-height: 24px;
}
</style>

